package com.java.concurrent;

import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * d
 *
 * @author wwm
 * @create 2017-04-19 18:22
 **/
public class TestCustomer implements Callable<Integer> {
     AtomicInteger atomicInteger = null;

 public  TestCustomer(AtomicInteger atomicInteger1){
     this.atomicInteger=atomicInteger1;
 }
    public Integer call() throws Exception {



          atomicInteger.decrementAndGet();
        System.out.println("cutom:" + atomicInteger.get());
        System.out.println("cutom-threadname:"+Thread.currentThread().getName());
        System.out.println("cutom-threadid:"+Thread.currentThread().getId());

        return this.atomicInteger.get();
    }
}
